package cn.gqr.service;



import cn.gqr.entity.Role;
import cn.gqr.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "sobook-user")
public interface RemoteUserService {

    @RequestMapping("/api/login/selectUserByUsername/{username}")
    User selectUserByUsername(@PathVariable("username") String username);

    @RequestMapping("/api/login/selectUserPermissions/{roleId}")
    List<String> selectUserPermissions(@PathVariable("roleId") Integer roleId);

    @RequestMapping("/api/login/selectUserRole/{userId}")
    List<Role> selectUserRole(@PathVariable("userId") Integer userId);

}
